package com.example.demo.mapper.entity;

import lombok.Data;

import java.util.ArrayList;
import java.util.List;
/*树形结点类*/
@Data
public class TreeNode {
    protected int id;
    protected int parentId;
    protected List<TreeNode> children = new ArrayList<TreeNode>();
    protected boolean hasChildren;

    public void addTreeNode(TreeNode node){
        children.add(node);
    }

}
